<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>


<!DOCTYPE html>
<html>
		<head>
<meta charset="utf-8" />
<title>蜂窝煤忘记密码</title>
<link href="CSS/pwdmain.css" rel="stylesheet" type="text/css" />
<script type="text/javascript"src="js/jquery.min.js"></script>
	<script>
	function checktel(){
	var a=$("#telcheck").val();
	if(a==null||a==""){
	return false;
	}
	else if(a<6){
	return false;
	}
	else{
	return true;
	}
	}
			function checkpwd(){
			var a=$("#newpwd").val();
			var b=$("#newpwd1").val();
			if(a!=b){
				$("#checkpwdlab").html("<font color='red' size='2'>×两次密码不相同</font>");
				return false;
			}else{
				$("#checkpwdlab").html(" ");
				return true;
			}
		}
		function checkpwd1(){
		var a=$("#newpwd").val();
		if(a==null||a==""){
		return false;
		}
		else{
		return true;
		}
		}
		function checkpwd2(){
		var a=$("#oldpwd").val();
		if(a==null||a==""){
		return false;
		}
		else if(a<11){
		return false
		}
		else{
		return true;
		}
		}
		function update(){
			return checkpwd()&&checkpwd1()&&checkpwd2()&&checktel();
		}
	</script>
	<style>
	.checkpwd{
		margin-left: 380px;
		margin-top: -20px;
	}
		.all{
			margin-top: 120px;
			margin-left: 450px;
			margin-right: 470px;
			background: white;
			height: 470px;
		}
		.labstyle{
		box-shadow: none;
		outline: 0 none;
		font-style: oblique;
		width: 250px;
		}
	</style>
		</head>
	<body > 
		<div style="position:absolute;width:100%;height:100%;background: url(image/user/updatepwd.jpg);">
		<div class="all" >
<h1 style="width:520px ;" >重置密码</h1>
<br><br>
<p class="cz_pass" style="font-size: large; margin-top: -20px;">你正在重置密码.</br><br>
请输入手机号、验证码并输入新密码重复确认，完成密码重置</p>
<form action="UserServlet?flag=forgetpwd" method="post">
<div class="pass_p" style="width: 500px;" ><label>手机号&nbsp;&nbsp;</label>
<input placeholder="请输入您的手机号" id="oldpwd" class="labstyle" name="usertel" onblur="checkpwd1()"maxlength="11">
</div>
<div class="pass_p" style="width: 500px;" ><label>验证码&nbsp;&nbsp;</label>
<input placeholder="请输入手机验证码" id="telcheck" class="labstyle"  onblur="checktel()"maxlength="6">
</div>
<div class="pass_p" style="width: 500px;" ><label>新密码&nbsp;&nbsp;</label>
<input placeholder="请输入6-16位的新密码" id="newpwd"  class="labstyle" name="newpwd" onblur="checkpwd2()">
</div>
<div class="pass_p_align" style="width: 500px;" ><label>确认密码&nbsp;&nbsp;</label>
<input placeholder="请再次输入新密码" id="newpwd1"  class="labstyle" name="newpwd1" onblur="checkpwd()"><p id="checkpwdlab" class="checkpwd"></p>
</div>
<input type="submit" class="cz_btn" style="width: 500px;" value="重置密码" onclick="return update()" formtarget="_blank"></input>
</form>
</div>
</div>
	</body>
</html>
